<%@ page  language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ page import="com.hz.supermanage.bean.HtmlBean,java.util.*,com.hz.framework.util.BusinessException" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:useBean id="dao" class="com.hz.supermanage.dao.ProgramaDao" />
<%
    try {
        dao.RqsetRole("all",request);
    }catch(Exception ex) {
       throw new BusinessException("查询角色失败", ex);
    }
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>系统权限设置</title>
<META http-equiv=Content-Type content=text/html;charset=UTF-8>
   <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
<link href="${pageContext.request.contextPath}/parts/CSS/mail.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/parts/CSS/base.css" rel="stylesheet" type="text/css"/>
<link href="${pageContext.request.contextPath}/parts/CSS/lb.css" rel="stylesheet" type="text/css"/>
<script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/ajax.js'></script>
<script type='text/javascript' src='${pageContext.request.contextPath}/dwr/engine.js'></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/parts/framejs/common/validate.js"></script>
<script src="${pageContext.request.contextPath}/parts/itemjs/supermanage/setup/Juice.js"></script>
<script src="${pageContext.request.contextPath}/parts/itemjs/supermanage/roleGrama/TreeMouseMenu.js"></script>
<script src="${pageContext.request.contextPath}/parts/itemjs/supermanage/roleGrama/Control.js"></script>
<script src="${pageContext.request.contextPath}/parts/itemjs/supermanage/roleGrama/roleGrama.js"></script>
<style type="text/css"> 
.treeCb {
	font-family: Tahoma;
	padding:0px;
	height:0px;
	font-size:10px;
	width:14px;
	height:14px;
	margin-left:2px;
}
.NodeName {
  font-size:12px;
}
.NodeName span,div{
  font-size:12px;
}
.RoleSpan{
	padding:1 1 1 1;cursor: hand;color: #0066cc;
}
.CRoleSpan{
	padding:1 2 1 2;cursor: hand;color: #000000;border: solid 1px;background-color: #ADB9D8;
}
</style>
<script type="text/javascript">
//这里Control.js中的ATree_loaded方法会调用此方法
function callback(){
	if(allobj!=null){
		var ugid = allobj.firstChild.value; //人员的权限id
		gainValueCheck(document,"gramaCkeck",",",ugid);
	}
}
</script>
</head>
<body style="overflow: hidden" >
<form method="post" action="">
<%@ include file="inc/Grama.jsp" %>
<div style='overflow:hidden;padding:7 10 7 0' align="right">
<INPUT class="btn" type="button" value="删除角色" title="删除一个角色" onclick="domanageRole('D')" style='cursor:hand;'>&nbsp;&nbsp;
<INPUT class="btn" type="button" value="增加角色" title="增加一个角色" onclick="domanageRole('A')" style='cursor:hand;'>&nbsp;&nbsp;
<INPUT class="btn" type="button" value="保存权限" title="保存权限到角色" onclick="doSaveGR('R')" style='cursor:hand;'>&nbsp;&nbsp;
<INPUT class="btn" type="button" value="关闭窗口" title="关闭窗口" onclick="parent.__close()" style='cursor:hand'>
</div>
<div tt.impl=WABody style='overflow-y:auto;height: 100%;width: 100%;'>
<input type=hidden name='userPk' value="">
<table width='100%' height="400" cellspacing=0 cellpadding=0>
<tr>
<td style='padding:5px;width: 35%;height: 98%' align="center">
<div style='overflow-y:auto;height: 98%;width: 100%;padding:5 5 5 5' align="left" id="rolediv">
<c:forEach items="${list}" var="rows">
<span class="RoleSpan" onmouseout="doMsOut()" onmouseover="doMsOver()" onclick='doshowGrama(this)'>
<input type="hidden" name='grama' value="${rows.rolegrama }"><input type="radio" name='roleid' value="${rows.roleid }" onclick='doclickRole(this)'> ${rows.rolename }
</span><br>
</c:forEach>
<input type="hidden" name='pub' value="">
</div>
</td>

<td style='padding:5px;width: 65%;height: 98%'>
<%=HtmlBean.getSmoothBegin()%>
<div tt.impl="FatherTreeC" tt.src="xml/pros_xml.jsp" tt.instance='ATree' id=COMP style='width:100%;overflow-y:auto;height:380' ></div>
<%=HtmlBean.getSmoothEnd()%>

</td></tr></table>
</div>
</form>
    </body>
    </html>